import http from "@/utils/http";

/**
 * 登录
 * @param {*} data 登录参数 { username: string, password: string }
 * @returns
 */
export const login = (data) => {
  return http({
    method: "post",
    url: "/user/account/passwordLogin",
    data,
  });
};

/**
 * 注册
 * @param {*} data 注册参数 { email: string, password: string }
 * @returns
 */
export const register = (data) => {
  return http({
    method: "post",
    url: "/user/account/register",
    data,
  });
};
